home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Other / mCD / Source / scsi_cd.subproj / cd_toc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-13  |  1.2 KB  |  42 lines

  1. /*
  2.  * cd_toc.h: header file that defines CD table-of-contents entries
  3.  * Garance Alistair Drosehn/March 1994.
  4.  *
  5.  */
  6.  
  7. #ifndef CD_TOC_INCLUDED
  8. #define CD_TOC_INCLUDED
  9.  
  10. /* an entry in the toc (table-of-contents) info */
  11. struct toc_info {
  12.     u_char    control;    /* control bits */
  13.     u_int    lblock;        /* start address as logical-block */
  14.     u_int    hour:8,        /* start address as MSF */
  15.         min:8,
  16.         sec:8,
  17.         frame:8;    /* there are 75 frames in a sec */
  18.     u_int    elapsedSec:16;    /* elapsed seconds for this track */
  19.     char    *trackTitle;    /* pointer to song title, if known */
  20. };
  21.  
  22. /* control bits */
  23. #define PRE_EMPHASIS    0x1    /* pre-emphasis or not */
  24. #define DIGITAL_COPY    0x2    /* digital copy permitted (1) or not (0) */
  25. #define DATA_TRACK    0x4    /* data track (1) or audio track (0) */
  26. #define FOUR_CHANNEL    0x8    /* four channel (1) or two channel (0) */
  27.  
  28. /* entire table of contents */
  29. struct cd_toc {
  30.     u_short        firsttrack:8,
  31.             lasttrack:8;
  32.     int        naudio,        /* number of audio tracks */
  33.             ndata,        /* number of data tracks */
  34.             lastDataBlock;    /* very last data block */
  35.     char        *discTitle;    /* title of the CD */
  36.     char        *discPerformer;    /* artist(s) on the CD */
  37.     char        *discCatNum;    /* media catalog number (UPC) */ 
  38.     struct toc_info    info[101];    /* 0-99 + transition area (100) */
  39. };
  40.  
  41. #endif
  42.